﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class ChucNang_Admin_Admin_ThongKeDoanhThuTheoQuy : System.Web.UI.Page
{
    DataDSTableAdapters.DATHANGTableAdapter dhadapter = new DataDSTableAdapters.DATHANGTableAdapter();
    protected void Page_Load(object sender, EventArgs e)
    {
        int nam = DateTime.Now.Year;
        GridView1.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 1);
        GridView1.DataBind();
        GridView2.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 2);
        GridView2.DataBind();
        GridView3.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 3);
        GridView3.DataBind();
        GridView4.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 4);
        GridView4.DataBind();

    }
    protected void btnThongKe_Click(object sender, EventArgs e)
    {

        int nam =int.Parse(dropdownNam.SelectedValue.ToString());
        GridView1.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 1);
        GridView1.DataBind();
        GridView2.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 2);
        GridView2.DataBind();
        GridView3.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 3);
        GridView3.DataBind();
        GridView4.DataSource = dhadapter.DATHANG_ThongKeDoanhThuTungQuy(nam, 4);
        GridView4.DataBind();
    }
}
